[XEND] If 'vncused' is set, it won't specify an explicit display num to QEMU.
authorkaf24@firebug.cl.cam.ac.uk <kaf24@firebug.cl.cam.ac.uk>
Wed, 4 Oct 2006 08:42:41 +0000 (09:42 +0100)
committerkaf24@firebug.cl.cam.ac.uk <kaf24@firebug.cl.cam.ac.uk>
Wed, 4 Oct 2006 08:42:41 +0000 (09:42 +0100)
commit5af2ee5b88ba3325cc5c6800baea71a8f2f821c2
treecdc58dcb06711c335aa228fd241babb591ae7756
parent592a9a5792d7c22bdb9101ac5509caa0f7e8b5de
[XEND] If 'vncused' is set, it won't specify an explicit display num to QEMU.

In the current xen-unstable.hg tree tough, XenD will always pass an
explicit '-vnc <display num>' parameter to qemu-dm, regardless of
whether 'vncunused' is set. So the 'vncunused' bit only takes effect
if the explicitly passed display already has something bound to it.

Consider what happens when the host machine has been up for a while -
the Domain ID's start getting very high. This plays havoc with
firewalls - for example an admin may know that only 10 domains will
ever be running at any time, so they should be able to simply open up
ports 5900 -> 5910.

The correct behaviour should be:

   - If 'vncdisplay' is set, use that explicit display
   - If 'vncunused' is set non-zero, allocate first port about 5900
   - Allocate fixed port based on domain-ID

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
tools/python/xen/xend/image.py